//1. 封装一个Vue的构造函数

function Vue(options){
   this._data = options.data 

   for (let key of Object.keys( this._data)){
    Object.defineProperty(this,key,{
        get(){
            return this._data[key]
        },
        set(newVal){
            this._data[key] = newVal
        }
    })
   }

console.log(options);
}

const vm = new Vue({
    data : {
        count: 1,
        course: {
          type: "easy",
          name: "vue",
        },
    }
})


console.log(vm);